#ifndef LIGHTINGUI_H
#define LIGHTINGUI_H

#include <QWidget>
#include <QDateTime>
#include "lightprocesser.h"

namespace Ui {
class LightingUI;
}

class LightingUI : public QWidget
{
    Q_OBJECT

public:
    explicit LightingUI(QWidget *parent = 0);
    ~LightingUI();
    void shutdownAll();
    void initRepeatTimes();
    void onLightResume();
    int getLightErr();

private slots:
    void on_btnCnl_clicked();
    void updateTime();

    void on_btnPause_clicked();
    void getShow();
    void onLightDone(int iRet);
    void on_btnRet_clicked();

    void onStatusChange(int iv);

    void onShutdown();


signals:
    void retMain();
    void sendErr(QString qErr);
    void lightDone(int iRet);


private:
    Ui::LightingUI *ui;
    LightProcesser *lpThread;
    QDateTime qdtStart;
    bool bLightingFlag;
    bool bShutdownFlag;
    bool bErrFlag;
    bool bPauseFlag;
    bool bBtnPressed;
    int* iErrRepeatTimes;
    int iLightErr;
};

#endif // LIGHTINGUI_H
